#include<iostream>
using namespace std;
int *twoSum(int *nums,int target){
    int *result = new int[2];
    int n = sizeof(nums)/sizeof(nums[0]);
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++)
	{
		if(nums[i]+nums[j]==target)
		{
			result[0]=i;
			result[1]=j;
		}
	}
    }
    return result;
}
int main(){
    int nums[] = {2,7,11,15};
    int target = 9;
    int *result = new int[2];
    result = twoSum(nums,target);
    cout<<result[0]<<result[1]<<endl;
    delete [] result;
}
